<?php
$this->breadcrumbs = array(
    '消息记录'
);
?>
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'search-form',
    'type' => 'search',
    'method' => 'GET',
    'htmlOptions' => array('class' => 'navbar-search pull-left', 'style' => 'margin:0;width:100%;'),
));
?>
<div class="submenu">
    <div class="row">
        <div class="col-xs-4">
            <?php
            echo CHtml::tag('button', array('type' => 'button', 'class' => 'btn btn-default btn-full', 'data-datepicker' => 'range', 'data-time-from' => '#MsggItem_time_begin', 'data-time-to' => '#MsggItem_time_end', 'data-time-ranges' => 'true', 'data-time-delta' => 30), ' ');
            echo $form->hiddenField($model, 'time_begin');
            echo $form->hiddenField($model, 'time_end');
            ?>
        </div>
        <div class="col-xs-2">
            <?php
            echo $form->dropDownList($model, 'type', MsggItem::getOptions('type', array('' => '===消息类型===')), array('class' => 'form-control'));
            ?>
        </div>
        <div class="col-xs-2">
            <?php
            echo $form->dropDownList($model, 'pid', MsggItem::getOptions('pid', array('' => '===关联人员===')), array('class' => 'form-control', 'data-select' => 'picker', 'data-live-search' => 'true'));
            ?>
        </div>
        <div class="col-xs-2">
            <?php
            echo $form->dropDownList($model, 'status', MsggItem::getOptions('status', array('' => '===消息状态===')),array('class' => 'form-control', 'data-select' => 'picker', 'data-live-search' => 'true'));
            ?>
        </div>
        <div class="col-xs-2">
            <?php
            echo $form->dropDownList($model, 'alarm_type', AlarmType::getOptions('type', array('' => '===告警类型===')), array('class' => 'form-control', 'data-select' => 'picker', 'data-live-search' => 'true'));
        ?>
        </div>
        <div class="col-xs-2">
            <?php
            echo $form->dropDownList($model, 'app_id', MsggApp::getOptions('app_label', array('' => '===来源应用===')), array('class' => 'form-control', 'data-select' => 'picker', 'data-live-search' => 'true'));
            ?>
        </div>
        <div class="col-xs-1">
            <button class="btn btn-primary" style="width:100%;" type="submit" name="yt0"><i class="fa fa-search"></i>
            </button>
        </div>
    </div>
</div>
<?php
$this->endWidget();
?>
<div>
    <?php
    $columns = array(
        array('name' => 'info', 'value' => array($this, 'colRevise'), 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:60%')),
        array('name' => 'params', 'value' => array($this, 'colRevise'), 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:60%')),
        array('name' => 'logs', 'value' => array($this, 'colRevise'), 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:60%')),
    );
    $this->widget('bootstrap.widgets.TbGridView', array(
        'id' => 'model-grid',
        'ajaxVar' => null,
        'type' => array(),
        'enableSorting' => false,
        'dataProvider' => $model->searchByKey(),
        'columns' => $columns,
    ));
    ?>
</div>